package com.woniuxy.creditsystem.common.mapper;

import com.woniuxy.creditsystem.common.bean.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

/**
 * 登录接口
 * @author hejie
 */
@Mapper
public interface SystemMapper {


    /**
     * 根据登录名查询账号
     * @param loginName
     * @return
     */
    @ResultType(UserInfo.class)
    @Select("select id,user_name as userName,password from user_info where user_name = #{loginName} and status = 1")
    UserInfo loginByName(@Param("loginName") String loginName);

}
